<!DOCTYPE html>
<html lang="zh"   xmlns:th="http://www.thymeleaf.org"
   xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
    th:with="blogConfig=${@configTag.getConfigValueMap('zgblog')},post=${@articleTag.getWebArticleHtmlById(postId==null?blogConfig['oly.web.theme.zgblog.docs.defaultPostId']:postId)}">

<head th:if="${post!=null}">
    <th:block th:include="zgblog/blog_include :: blogHeader(title=${blogConfig['oly.web.title']+'-'+post.articleTitle},
keywords=${blogConfig['oly.web.keywords']+','+post.keywords},
description=${post.description},
blogConfig=${blogConfig})" />
    <th:block th:include="zgblog/blog_include :: reset_css" />
    <link th:href="@{/themes/zgblog/resources/css/global.css?a=7}" rel="stylesheet">
    <link th:href="@{/themes/zgblog/resources/css/prism.css?a=uhvb}" rel="stylesheet">
    <link th:href="@{/themes/zgblog/resources/model/typo.css-2.1.2/typo.css}" rel="stylesheet">
    <style>
        a {
            text-decoration: none !important;
        }
    </style>
</head>

<head th:if="${post==null}">
    <th:block th:include="zgblog/blog_include :: blogHeader(title=${blogConfig['oly.web.title']},
keywords=${blogConfig['oly.web.keywords']},
description='文章不存在',
blogConfig=${blogConfig})" />
    <link th:href="@{/themes/zgblog/resources/css/global.css?a=9}" rel="stylesheet" />
</head>

<body>
    <th:block th:include="zgblog/blog_include::menu()" />
    <!-- 主体部分 -->
    <section class="zgblog-main-box">
        <div class="layui-row">
            <div class="layui-col-md2 layui-col-md-offset2 zgblog-left-box">
                <div class="layui-panel site-menu" 
                    th:with="catTree=${@categoryTag.getCatTreeById(blogConfig['oly.web.theme.zgblog.docs.catId'])}">
                    <ul class="layui-menu layui-menu-lg site-docs-menu" style="padding-bottom:90px">
                        <li class="layui-menu-item-group" lay-options="{type: 'group', isAllowSpread: true}"
                            th:each="cat:${catTree.childList}">
                            <div class="layui-menu-body-title" th:text="${cat.catName}">
                                基础说明
                            </div>
                            <hr>
                            <ul th:with="posts=${@articleTag.listWebArticlesOrderByCatId(cat.catId,1,blogConfig['oly.web.theme.zgblog.docs.size'],blogConfig['oly.web.theme.zgblog.docs.order'])}">
                                <li th:each="post,postStat:${posts}">
                                    <div class="layui-menu-body-title">
                                        <a
                                            th:href="${blogConfig['oly.web.domain']+'/custom/docs?postId='+post.articleId}">
                                            <span th:text="${post.articleTitle}">开始使用 </span>
                                            <span class="layui-font-12 layui-font-gray"
                                                th:text="${post.articleSummary}">Getting Started</span>
                                        </a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="layui-hide-v"> - </div>
            </div>
            <div class="layui-col-md6 site-content" th:if="${post!=null}">
                <h1 class="site-h1" th:text="${post.articleTitle}">开始使用 - 入门指南</h1>
                <div id="postContent" th:utext="${post.articleContent}">

                </div>
            </div>

            <div class="layui-col-md9 site-content" th:if="${post==null}">
                <h1 class="site-h1">文档不存在!</h1>

            </div>

            <div class="footer footer-docs">

            </div>
        </div>
    </section>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon layui-icon-spread-left"></i>
    </div>
    <div class="site-mobile-shade"></div>

    <script>
        window.global = {
            pageType: 'docs'
            , preview: function () {
                var preview = document.getElementById('LAY_preview');
                return preview ? preview.innerHTML : '';
            }()
        };
    </script>
    <!-- 底部导航 -->
    <th:block th:include="zgblog/blog_include::bottom" />
    <th:block th:include="zgblog/blog_include::footer_js" />
    <script th:src="@{/themes/zgblog/resources/js/prism.js?a=4}" ></script>
    <script>
        layui.config({
            base: '/themes/zgblog/resources/js/'
            , version: '1886h59'
        }).use('global'); 
    </script>


</body>

</html>